<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- 
        box-shadow:对盒子进行阴影
        drop-shadow:对盒子内容所占区域进行阴影
     -->
    <div class="container">
        box-shadow
        <div id="box">
            <img src="./imgs/apple.png" alt="">
        </div>
        filter:drop-shadow
        <div id="filter">
            <img src="./imgs/apple.png" alt="">
        </div>
    </div>

    <style>
        .container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
        }

        #box,
        #filter {
            width: 200px;
            height: 200px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        #box>img,
        #filter>img {
            width: 90%;
            height: 90%;
        }

        #box {
            box-shadow: 0px 0px 10px #f0f;
        }

        #filter {
            filter: drop-shadow(0px 0px 10px #f0f);
        }
    </style>
</body>

</html>